﻿using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class CameraCallBack : MonoBehaviour
{
    public Action onPostRender;
    private static Material lineMaterial;
    public Shader shader;
    void CreateLineMaterial()
    {
        lineMaterial = new Material(shader);
        lineMaterial.hideFlags = HideFlags.DontSave;
        lineMaterial.SetPass(0);
    }
    private void OnPostRender()
    {
        CreateLineMaterial();
        if (onPostRender != null) onPostRender.Invoke();
    }
    // Use this for initialization
    void Start()
    {

    }

    // Update is called once per frame
    void Update()
    {

    }
}
